package cn.com.czpb.client.module.videonew;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.com.czpb.client.R;
import cn.com.czpb.client.model.livenew.LiveNewListBean;
import cn.com.czpb.client.model.videonew.VideoNewListBean;

/**
 * Created by Administrator on 2018/6/26.
 */

public class VideoListAdapter extends BaseQuickAdapter<VideoNewListBean,BaseViewHolder>
{
    public VideoListAdapter(@Nullable List<VideoNewListBean> data) {
        super(R.layout.item_live_list, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, VideoNewListBean item) {
        helper.addOnClickListener(R.id.item);
        helper.setText(R.id.tv_title,item.getTitle());
        Glide.with(mContext).load(item.getMainpic()).into((ImageView) helper.getView(R.id.iv_img));
    }
}
